<template>
  <VDialog
    @close="handleClose"
    :loading="loading"
    :disabled="true"
    title="付款/收款人信息"
  >
    <template #content>
      <div v-for="(item, key) in titleFild" :key="item">
        <span class="text-gray-500">{{ key }}</span> :
        <span class="text-gray-950">{{ data?.[item] || "-" }}</span>
      </div>
    </template>
  </VDialog>
</template>
<script setup>
const props = defineProps({
  data: { type: Object, default: () => {} },
});
const titleFild = {
  付款人: "payerName",
  付款人账户: "payerAccountNo",
  付款人账户类型: "payerAccountType",
  收款人: "beneficiaryName",
  收款人账户: "beneficiaryAccountNo",
  收款人账户类型: "beneficiaryAccountType",
  "收款人账户所在国家/地区": "beneficiaryBankCountry",
  收款人账户所属银行名称: "beneficiaryBankName",
  收款人店铺名: "beneficiaryStoreName",
  集成商在Marketplace上的注册名: "beneficiaryMarketplaceName",
  转账附言: "remarks",
  交易描述信息: "description",
  RA或VA账号: "receiveAccount",
  付款方ID: "payerUserId",
  付款补充说明: "paymentExplanation",
  付款人注册名: "paymentSubject",
  付款凭证: "paymentVoucherNo",
};
const emit = defineEmits(["update:modelValue", "close", "refresh"]);
const handleClose = async (refresh) => {
  emit("update:modelValue", false);
  emit("close");
  if (refresh) emit("refresh");
};
</script>
